//
//  SinaHomePictureViewCell.swift
//  MySinaWeiBoSwiftProject
//
//  Created by apple on 2016/11/17.
//  Copyright © 2016年 WangChen. All rights reserved.
//

import UIKit

class SinaHomePictureViewCell: UICollectionViewCell {

    
    @IBOutlet weak var imageV: UIImageView!
    
    @IBOutlet weak var gifImage: UIImageView!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        self.contentView.backgroundColor = randomColor()
        
       
        
    }

    var pictureInfoModel: SinaPictureInfoModel?{
        didSet{
            let url = pictureInfoModel?.imageURL
            imageV.sd_setImage(with: url)
            
            let isGif = pictureInfoModel!.bmiddleURLStr!.hasSuffix("gif")
            gifImage.isHidden = !isGif
        }
    }
    
}
